fix(input): support oe and ae ligature input (@Dawn-Fighter)#7953
fix(input): support oe and ae ligature input (@Dawn-Fighter)#7953Dawn-Fighter wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds ligature-aware input normalization so users can type decomposed sequences (e.g., oe) while matching ligature target characters (œ), and avoids stray “completion” characters being inserted after a ligature.
Changes:
- Introduces
ligatures.tshelper utilities to detect/normalize ligature overrides and ignore ligature “completion” insertions. - Integrates ligature logic into
onInsertTextand normalization flow ininsert-text.ts. - Adds Vitest coverage for the new ligature helper behaviors.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/src/ts/input/helpers/ligatures.ts | New helper functions for ligature override matching and completion-ignore logic. |
| frontend/src/ts/input/handlers/insert-text.ts | Hooks ligature logic into insert-text handling (ignore completion + normalize first char to ligature). |
| frontend/tests/input/handlers/insert-text.spec.ts | New unit tests for ligature helper functions. |
Leonabcd123
left a comment
There was a problem hiding this comment.
Typing œuvre as ouvre is considered correct, even though it should be oeuvre.
|
I was just solving a issue found on the page.. |
Well, the fix isn't correct if it considers a ligature to be typed correctly when the second letter in it can be skipped. |
|
thanks for the review |
|
You're right, the previous implementation normalized the first character of the ligature immediately, so |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |

Description
Fixes ligature input handling for words containing
œ/Œandæ/Æ.Currently, words like
œuvre,bœuf,cœur, orætherrequire typing the ligature character directly. This patch allows users to type the ASCII equivalents instead:oeforœOEforŒaeforæAEforÆWhen the first character is typed, the input is normalized to the target ligature. When the completion character is typed, it is ignored instead of being counted as an incorrect extra character.
Closes #7921.
Verification
Automated:
Manual:
Tested locally with custom text:
Typed using:
The ligatures were accepted correctly and the completion characters were not counted as incorrect input.
Thank you for maintaining Monkeytype. Kindly review when you have time, and please let me know if any changes are needed. Happy to update the patch.